#include<stdio.h>
int main(void){
	double score = 0;
	int i,j,k,l,m;
	for(i=0;i<7;i++){
		for(j=0;j<7;j++){
			if(j==i)continue;
			for(k=0;k<7;k++){
				if(k==i||k==j)continue;
				for(l=0;l<7;l++){
					if(l==i||l==j||l==k)continue;
					for(m=0;m<7;m++){
						if(m==i||m==j||m==k||m==l)continue;
						if(i==0)score+=2.0;
						if(j==1)score+=2.0;
						if(k==2)score+=2.0;
						if(l==3)score+=2.0;
						if(m==4)score+=2.0;
					}
				}
			}
		}
	}
	printf("%.6f",score/2520.0);

} 

